package utils
{
	import flash.display.DisplayObject;
	import flash.display.Shape;
	import flash.display.Sprite;
	
    public class PanelUtil
    {

        public function PanelUtil()
        {
        }

        public static function drawBackground(param1:Sprite, param2:uint = 0, param3:Number = 0.3) : DisplayObject
        {
            var _loc_4:* = new Shape();
            var _loc_5:* = new Shape().graphics;
            new Shape().graphics.beginFill(param2, param3);
            _loc_5.drawRect(1, 1, param1.width - 2, (param1.height - 1));
            _loc_5.endFill();
            param1.addChildAt(_loc_4, 0);
            return _loc_4;
        }
        public static function drawBg(param1:uint, param2:Number, param3:Number, param4:Number = 1) : Shape
        {
            var _loc_5:* = new Shape();
            new Shape().graphics.beginFill(param1, param4);
            _loc_5.graphics.drawRect(0, 0, param2, param3);
            _loc_5.graphics.endFill();
            return _loc_5;
        }
        public static function getRoundBg(param1:Number, param2:Number, param3:uint = 0, param4:Number = 0.3, param5:int = 2, param6:uint = 13021807, param7:Number = 1) : Shape
        {
            var width:* = param1;
            var height:* = param2;
            var color:* = param3;
            var alpha:* = param4;
            var lineThickness:* = param5;
            var lineColor:* = param6;
            var lineAlpha:* = param7;
            var shape:* = new Shape();
            var _loc_9:* = shape.graphics;
            with (shape.graphics)
            {
                lineStyle(lineThickness, lineColor, lineAlpha);
                beginFill(color, alpha);
                drawRoundRect(0, 0, width, height, 5, 5);
                endFill();
            }
            return shape;
        }
    }
}
